package com.example.warehouse.sys.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class SysRoleStandardParam {
    @NotNull(message = "请输入需要修改的角色id")
    @ApiModelProperty(value = "角色id", required = true)
    private Long id;
    /*
     * 名称
     */
    @NotEmpty(message = "请输入角色名")
    @Pattern(regexp = "^.{2,15}$", message = "角色名称必须是2~15长度的字符组成")
    @ApiModelProperty(value = "角色名", required = true)
    private String name;

    /*
     * 简介
     */
    @NotEmpty(message = "请输入角色备注")
    @Pattern(regexp = "^.{4,200}$", message = "角色备注必须是4~15长度的字符组成")
    @ApiModelProperty(value = "角色备注")
    private String description;
    /*
     *排序
     */
    @NotNull(message = "请输入排序")
    @ApiModelProperty(value = "排序")
    private Integer sort;
    /*
     * 是否可用，0不可用，1可用
     */
    @ApiModelProperty(value = "是否启用:0不可用，1可用")
    private Integer enable;
}
